﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MethodWorx.CMS.Plugins;

namespace MethodWorx.CMS.UI.Areas.Administration.Models
{
    public class PluginsModel
    {
        public IEnumerable<IPlugin> Plugins { get; set; }
        public IEnumerable<SafePlugin> SafePlugins
        {
            get
            {
                return this.Plugins.OfType<SafePlugin>().Where(s => s.IsSafe);
            }
        }
        public IEnumerable<SafePlugin> UnsafePlugins
        {
            get
            {
                return this.Plugins.OfType<SafePlugin>().Where(s => !s.IsSafe);
            }
        }
    }
}